
/*
 * @Author: codeD
 * @Date: 2022-02-17 19:11:44
 * @LastEditors: codeD
 * @LastEditTime: 2022-02-19 09:54:12
 * @Description: file content
 * @FilePath: \wpt\src\router\index.tsx
 */
import React from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Home from '../pages/Home';
import Community from '../pages/Community';
import Classification from '../pages/Classification';
import Mine from '../pages/Mine';
import Complete from '../pages/Classification/ClassDetail/complete'
// import routerConfig from "./config";
// import { Router } from './type'
export default () => {
  // const getRouter = (obj: Router) => {
  //   if (obj.children) {
  //     getRouter(obj.children)
  //   }
  //   return <Route path={obj.path} key={obj.path} element={<obj.Component />} />
  // }
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<Home />}>
        </Route>
        <Route path="/classification" element={<Classification />} >
      
          </Route>
          <Route path="/classdetail/complete/:cateId/:secCateId" element={<Complete />} />
        <Route path="/community" element={<Community />} />
        <Route path="/mine" element={<Mine />} /> 
      </Routes>
    </BrowserRouter>
  );
};
